@extends('layout.art')
@section('content')
<!-- 配置文件 -->
<script type="text/javascript" src="/uediter/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/uediter/ueditor.all.js"></script>
<div class="container-fluid">
<a class="btn btn-info" onclick="javascript:history.back(-1);">取消修改</a>
    <form class="form-horizontal" method="post" action="/new/{{$res->id}}">
         {{csrf_field()}}
         {{ method_field('PUT') }}
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">标题</label>
            <div class="col-sm-8">
                <input type="title" class="form-control" id="title" name="title"placeholder="{{$res->title}}">
            </div>
        </div>


        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">内容</label>
            <div class="col-sm-8">
<!--                 <textarea class="form-control" rows="5" id="content" name="content" placeholder="{{$res->content}}"></textarea> -->
            		<!-- 加载编辑器的容器 -->
			    	<script id="myedit" name="content" type="text/plain">					
       						<?php echo html_entity_decode("$res->content");?>
    				</script>
    				<!-- 实例化编辑器 -->
		     		<script type="text/javascript" >
			     		 		var ue = UE.getEditor('myedit',{
			     		 			
			     		 			toolbars: [
				     		 			  
				     		 			         [
				     		 			             'anchor', //锚点
				     		 			             'undo', //撤销
				     		 			             'redo', //重做
				     		 			             'bold', //加粗
				     		 			             'indent', //首行缩进
				     		 			             'snapscreen', //截图
				     		 			             'italic', //斜体
				     		 			             'underline', //下划线
				     		 			             'strikethrough', //删除线
				     		 			             'subscript', //下标
				     		 			             'fontborder', //字符边框
				     		 			             'superscript', //上标
				     		 			            'formatmatch', //格式刷
				     		 			             'blockquote', //引用
					     		 			         'simpleupload', //单图上传
						     		 			     'insertimage', //多图上传
				     		 			             'pasteplain', //纯文本粘贴模式
				     		 			             'selectall', //全选
					     		 			          'music', //音乐
						     		 			      'inserttable', //插入表格
							     		 			  'drafts', // 从草稿箱加载
							     		 			  'charts', // 图表
								     		 		  'map', //Baidu地图
							     		 	          'gmap', //Google地图
				     		 			             ]
			     		 			             ],
				     		 			 autoHeight: false,
		     		 			         autoFloatEnabled: true
									});
			     		 		
			     		</script>
            </div>
        </div>
   
  
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default">修改</button>
            </div>
        </div>
    </form>
</div>


@endsection